.row.top-row
	.btn-default.launch-button(value='Launch Quiz', data-target='#qr-modal-normal' data-toggle='modal') Normal Launch
	.btn-default.launch-button(value='Live Launch', data-target='#qr-modal-live' data-toggle='modal') Live Launch
	.btn-group
		.btn-default.launch-button.dropdown-toggle(data-toggle='dropdown' aria-haspopup='true' aria-expanded='false') Review Results
			span.caret.review-caret
		ul.dropdown-menu
			li(ng-repeat='instance in activeQuiz.activity')
				a.results-link(ng-click='reviewResults($index)')
					p.results-link-name <span class='strong'>Name: </span> {{ instance.quiz.name }}
					p.result-link-date <span class='strong'>Date: </span> {{ instance.createdAt.substring(0,10) }}
	.edit-icon
		span.glyphicon.glyphicon-pencil(aria-hidden="true", ui-sref='dashboard.review.edit', ng-click='editActiveQuiz()')
.row.quiz-review
	h3 Quiz Title: {{activeQuiz.name}}
	ul.active-quiz-question-list
		li(ng-repeat='question in activeQuiz.questions')
			span.bold{{ numbers[$index] }}:&nbsp&nbsp
			{{ question.name }}
			ul.active-quiz-answer-list
				li(ng-repeat='answer in question.answers')
					span.bold{{ letters[$index] }}:&nbsp&nbsp 
					{{ answer.content }}
.modal.fade.qr-code-modal#qr-modal-normal(tabindex='-1', role='dialog', aria-labelledby='qr-modal-label')
	.modal-content
		.modal-header
			button.close(type='button', data-dismiss='modal', aria-label='Close')
				span(aria-hidden='true') &times	
			h3 Quiz Settings [Normal Launch]
		.modal-body
			p Please select a few final settings before launching this quiz.
			.settings-option
				p Set Global Time Limit
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', name='settings-switch-1', ng-change='quizInstanceSettings.timeLimit=null' ng-model='quizInstanceSettings.hasTimeLimit' id='settings-switch-1', checked)
					label.onoffswitch-label(for='settings-switch-1')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option(ng-hide='!quizInstanceSettings.hasTimeLimit')
				p Time Limit: 
				.onoffswitch-time
					input.quiz-question-time(type='number', ng-model='quizInstanceSettings.timeLimit', name='globalTime', class='form-control', placeholder='TIME (IN SECONDS)')
			.settings-option
				p Display Question Results
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-change='quizInstanceSettings.displayResultsQuestion=false' ng-model='quizInstanceSettings.displayResults', name='settings-switch-2', id='settings-switch-2', checked)
					label.onoffswitch-label(for='settings-switch-2')
						span.onoffswitch-inner
						span.onoffswitch-switch
			//.settings-option(ng-hide='!quizInstanceSettings.displayResults')
				p &nbsp; &nbsp; &nbsp; &nbsp; Display Question Results
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-model='quizInstanceSettings.displayResultsQuestion', name='settings-switch-3', id='settings-switch-3', checked)
					label.onoffswitch-label(for='settings-switch-3')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Display Social Sharing Icons
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-model='quizInstanceSettings.displaySocial', name='settings-switch-4', id='settings-switch-4', checked)
					label.onoffswitch-label(for='settings-switch-4')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Display Answers
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', name='settings-switch-8', ng-model='quizInstanceSettings.showAnswers' id='settings-switch-8', checked)
					label.onoffswitch-label(for='settings-switch-8')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Set Deadline
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', name='settings-switch-7', ng-change='quizInstanceSettings.startDate=null; quizInstanceSettings.endDate = null', ng-model='quizInstanceSettings.hasDeadline' id='settings-switch-7', checked)
					label.onoffswitch-label(for='settings-switch-7')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option(ng-hide='!quizInstanceSettings.hasDeadline')
				.some-random-div
					p Start Date:
						.onoffswitch-date
							input.quiz-question-date.date-start(type='date', ng-model='quizInstanceSettings.activeTimeStart', name='startDate', class='form-control', placeholder='START DATE')
				.some-random-div
					p End Date:
						.onoffswitch-date
							input.quiz-question-date.date-end(type='date', ng-model='quizInstanceSettings.activeTimeEnd', name='endDate' class='form-control', placeholder='END DATE')
			.settings-option(ng-hide='!quizInstance')
			//.settings-option
				p Require User Login
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-model='quizInstanceSettings.requireLogin', name='settings-switch-5', id='settings-switch-5', checked)
					label.onoffswitch-label(for='settings-switch-5')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Login Requirements
				select.select-login-option.form-control(name='allowed-users-list' ng-model='quizInstanceSettings.allowUsers', id='settings-switch-6')
					option(value='nologin') No Login
					option(value='require') Require Login
					option(value='anonymous') Allow Anonymous
			.btn.btn-primary(ng-click='launchQuizInstance("normal")') Go Live!

.modal.fade.qr-code-modal#qr-modal-live(tabindex='-1', role='dialog', aria-labelledby='qr-modal-label')
	.modal-content
		.modal-header
			button.close(type='button', data-dismiss='modal', aria-label='Close')
				span(aria-hidden='true') &times	
			h3 Quiz Settings [Live Launch]
		.modal-body
			p Please select a few final settings before launching this quiz.
			.settings-option
				p Set Global Time Limit
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', name='settings-switch-1-live', ng-change='quizInstanceSettings.timeLimit=null' ng-model='quizInstanceSettings.hasTimeLimit' id='settings-switch-1-live', checked)
					label.onoffswitch-label(for='settings-switch-1-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option(ng-hide='!quizInstanceSettings.hasTimeLimit')
				p Time Limit: 
				.onoffswitch-time
					input.quiz-question-time(type='number', ng-model='quizInstanceSettings.timeLimit', name='globalTime', class='form-control', placeholder='TIME (IN SECONDS)')
			.settings-option
				p Display Question Results
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-change='quizInstanceSettings.displayResultsQuestion=false' ng-model='quizInstanceSettings.displayResults', name='settings-switch-2-live', id='settings-switch-2-live', checked)
					label.onoffswitch-label(for='settings-switch-2-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			//.settings-option(ng-hide='!quizInstanceSettings.displayResults')
				p &nbsp; &nbsp; &nbsp; &nbsp; Display Question Results
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-model='quizInstanceSettings.displayResultsQuestion', name='settings-switch-3-live', id='settings-switch-3-live', checked)
					label.onoffswitch-label(for='settings-switch-3-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Display Social Sharing Icons
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-model='quizInstanceSettings.displaySocial', name='settings-switch-4-live', id='settings-switch-4-live', checked)
					label.onoffswitch-label(for='settings-switch-4-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Display Answers
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', name='settings-switch-8-live', ng-model='quizInstanceSettings.showAnswers' id='settings-switch-8', checked)
					label.onoffswitch-label(for='settings-switch-8-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Set Deadline
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-change='quizInstanceSettings.startDate=null; quizInstanceSettings.endDate = null', name='settings-switch-7-live', ng-model='quizInstanceSettings.hasDeadline' id='settings-switch-7-live', checked)
					label.onoffswitch-label(for='settings-switch-7-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option(ng-hide='!quizInstanceSettings.hasDeadline')
				.some-random-div
					p Start Date:
						.onoffswitch-date
							input.quiz-question-date.date-start(type='date', ng-model='quizInstanceSettings.activeTimeStart', name='startDate', class='form-control', placeholder='START DATE')
				.some-random-div
					p End Date:
						.onoffswitch-date
							input.quiz-question-date.date-end(type='date', ng-model='quizInstanceSettings.activeTimeEnd', name='endDate' class='form-control', placeholder='END DATE')
			//.settings-option
				p Require User Login
				.onoffswitch
					input.onoffswitch-checkbox(type='checkbox', ng-model='quizInstanceSettings.requireLogin', name='settings-switch-5-live', id='settings-switch-5-live', checked)
					label.onoffswitch-label(for='settings-switch-5-live')
						span.onoffswitch-inner
						span.onoffswitch-switch
			.settings-option
				p Login Requirements
				select.select-login-option.form-control(name='allowed-users-list' ng-model='quizInstanceSettings.allowUsers', id='settings-switch-6-live')
					option(value='nologin') No Login
					option(value='require') Require Login
					option(value='anonymous') Allow Anonymous
			.btn.btn-primary(ng-click='launchQuizInstance("live")') Go Live!